package com.hzcx.app.simplechat.view;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.TextView;

import com.aspsine.swipetoloadlayout.SwipeLoadMoreTrigger;
import com.aspsine.swipetoloadlayout.SwipeRefreshTrigger;
import com.aspsine.swipetoloadlayout.SwipeTrigger;

/**
 * 基础的refreshHeadView
 */
public class RefreshFooterView extends TextView implements SwipeTrigger, SwipeLoadMoreTrigger {

 public RefreshFooterView(Context context) {
  super(context);
 }

 public RefreshFooterView(Context context, AttributeSet attrs) {
  super(context, attrs);
 }

 public RefreshFooterView(Context context, AttributeSet attrs, int defStyleAttr) {
  super(context, attrs, defStyleAttr);
 }

 @TargetApi(Build.VERSION_CODES.LOLLIPOP)
 public RefreshFooterView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
  super(context, attrs, defStyleAttr, defStyleRes);
 }


 @Override
 public void onLoadMore() {
  setText("数据加载中...");
 }

 @Override
 public void onPrepare() {
  setText("上拉加载数据");
 }

 @Override
 public void onMove(int i, boolean b, boolean b1) {

 }

 @Override
 public void onRelease() {

 }

 @Override
 public void onComplete() {
  setText("数据加载完成");
 }

 @Override
 public void onReset() {

 }
}
